import {createStore,combineReducers} from "redux";
import {collApsed,loadding} from "./reducer"
import { persistStore, persistReducer } from 'redux-persist'
import storage from 'redux-persist/lib/storage' // defaults to localStorage for web

const persistConfig = {
    key: 'root',
    storage,
    blacklist:['loadding']
}
const reducers = combineReducers({//合并多个状态
    collApsed,
    loadding
})

const persistedReducer = persistReducer(persistConfig, reducers)

const store = createStore(persistedReducer)//只能传一个参数
const persist_store = persistStore(store);
export {store,persist_store};